3.6 \(\int \frac{\csc ^2(x)}{i+\tan (x)} \, dx\)

Optimal. Leaf size=18 \[ i x+i \cot (x)+\log (\tan (x))+\log (\cos (x)) \]

[Out]

I*x + I*Cot[x] + Log[Cos[x]] + Log[Tan[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0333998, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3516, 44} \[ i x+i \cot (x)+\log (\tan (x))+\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^2/(I + Tan[x]),x]

[Out]

I*x + I*Cot[x] + Log[Cos[x]] + Log[Tan[x]]

Rule 3516

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[(x^m*(a + x)^n)/(b^2 + x^2)^(m/2 + 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{\csc ^2(x)}{i+\tan (x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{x^2 (i+x)} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \left (\frac{1}{-i-x}-\frac{i}{x^2}+\frac{1}{x}\right ) \, dx,x,\tan (x)\right )\\ &=i x+i \cot (x)+\log (\cos (x))+\log (\tan (x))\\ \end{align*}

Mathematica [A]  time = 0.0191565, size = 15, normalized size = 0.83 \[ i x+i \cot (x)+\log (\sin (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^2/(I + Tan[x]),x]

[Out]

I*x + I*Cot[x] + Log[Sin[x]]

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 20, normalized size = 1.1 \begin{align*} -\ln \left ( i+\tan \left ( x \right ) \right ) +\ln \left ( \tan \left ( x \right ) \right ) +{\frac{i}{\tan \left ( x \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^2/(I+tan(x)),x)

[Out]

-ln(I+tan(x))+ln(tan(x))+I/tan(x)

________________________________________________________________________________________

Maxima [A]  time = 1.40432, size = 23, normalized size = 1.28 \begin{align*} \frac{i}{\tan \left (x\right )} - \log \left (\tan \left (x\right ) + i\right ) + \log \left (\tan \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(I+tan(x)),x, algorithm="maxima")

[Out]

I/tan(x) - log(tan(x) + I) + log(tan(x))

________________________________________________________________________________________

Fricas [A]  time = 2.02021, size = 78, normalized size = 4.33 \begin{align*} \frac{{\left (e^{\left (2 i \, x\right )} - 1\right )} \log \left (e^{\left (2 i \, x\right )} - 1\right ) - 2}{e^{\left (2 i \, x\right )} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(I+tan(x)),x, algorithm="fricas")

[Out]

((e^(2*I*x) - 1)*log(e^(2*I*x) - 1) - 2)/(e^(2*I*x) - 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{2}{\left (x \right )}}{\tan{\left (x \right )} + i}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**2/(I+tan(x)),x)

[Out]

Integral(csc(x)**2/(tan(x) + I), x)

________________________________________________________________________________________

Giac [A]  time = 1.32035, size = 24, normalized size = 1.33 \begin{align*} \frac{i}{\tan \left (x\right )} - \log \left (\tan \left (x\right ) + i\right ) + \log \left ({\left | \tan \left (x\right ) \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(I+tan(x)),x, algorithm="giac")

[Out]

I/tan(x) - log(tan(x) + I) + log(abs(tan(x)))